from bases.cases.sn_popup import SnPopup
from tkinter import StringVar, IntVar, BooleanVar

from commons.public_gobals import PublicGlobals
from files.file_ini import FileIni
from windows import SN


def case_scan_sn():
    # strVar = StringVar(value='')
    SN.set(value='')
    boolVar = BooleanVar(value=False)
    sn_length = IntVar(value=int(FileIni.read_sn_length()))
    sn_popup = SnPopup(strVar=SN,boolVar=boolVar,sn_length=sn_length)
    sn_popup.wait_window()     # 等待
    PublicGlobals.sn_Seq = SN.get()
    return str(boolVar.get())
